<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('流程影像资料库列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <input name="docIds" type="hidden" th:value="${docIds}">
                <input name="sts" type="hidden" value="1">
                <div class="select-list">
                    <ul>
                        <li>
                            <label>资料编码：</label>
                            <input type="text" name="docCode"/>
                        </li>
                        <li>
                            <label>资料名称：</label>
                            <input type="text" name="docName"/>
                        </li>
                        <li>
                            <label>资料类型：</label>
                            <select name="docType" class="selectpicker"
                                    th:with="type=${@dict.getType('wfl_doc_type')}">
                                <option value="">所有</option>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                        th:value="${dict.dictValue}"></option>
                            </select>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('workflow:docList:edit')}]];
    var removeFlag = [[${@permission.hasPermi('workflow:docList:remove')}]];
    var docTypeDatas = [[${@dict.getType('wfl_doc_type')}]];
    var stsDatas = [[${@dict.getType('workflowsts')}]];
    var prefix = ctx + "workflow/docList";

    $(function () {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "流程影像资料库",
            columns: [{
                checkbox: true
            },
                {
                    field: 'docId',
                    title: '资料编号',
                    visible: false
                },
                {
                    field: 'docCode',
                    title: '资料编码'
                },
                {
                    field: 'docName',
                    title: '资料名称'
                },
                {
                    field: 'docType',
                    title: '资料类型',
                    formatter: function (value, row, index) {
                        return $.table.selectDictLabel(docTypeDatas, value);
                    }
                },
                {
                    field: 'sts',
                    title: '状态',
                    formatter: function (value, row, index) {
                        return $.table.selectDictLabel(stsDatas, value);
                    }
                }]
        };
        $.table.init(options);
    });

    function getSelections() {
        return $.table.selectFirstColumns();
    }
</script>
</body>
</html>